<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Duediligencebarbados</title>

<%@ page language = "java"	import="java.io.*,java.sql.*" %>

<%@include file="../dbcon.jsp"%>
<%
// Not Login or User Not Admin
	/*if ( session.getAttribute("SES_USERSNO") == null || (Integer)session.getAttribute("SES_USERTYPE") != 1  )
	{
		response.sendRedirect("index.jsp");
		return;
	}*/
	
	int iSno = 0;
	int iRecType = 1;
	int iUserType = 1;
	String sTmp = "";
	
	String sOwnerName = "",sTitle = "",sLocation = "",sLot = "",sLandTaxNo = "",sWaterzone = "";
	String sPrice = "",sAddress = "",sMobile = "",sEmail = "",sLandline = "",sDesc = "";
	
	sTmp = request.getParameter("ID");
	if ( sTmp != null && !sTmp.equals("") )
		iSno = Integer.parseInt(sTmp);
	sTmp = request.getParameter("RecType");
	if ( sTmp != null && !sTmp.equals("") )
		iRecType = Integer.parseInt(sTmp);		
	if ( iSno > 0 ) // Edit
	{
		iRecType = 2;
		Statement Stmt = null;
	    ResultSet Rs = null;
		try
		{
			String sQry = "select * from tbl_rel_land where reg_flag != 3 and status=1 ";
			sQry += "and id="+ iSno;
		System.out.println(sQry);
			Stmt = Con.createStatement();
			Rs = Stmt.executeQuery(sQry);
			if ( Rs.next() )
			{
				sTitle = Rs.getString("title");
				sOwnerName = Rs.getString("owner_name");				
				sLocation = Rs.getString("location");				
				sLot = Rs.getString("lot");				
				sLandTaxNo = Rs.getString("land_tax_no");
				sWaterzone = Rs.getString("water_zarea");
				sPrice = Rs.getString("price");				
				sMobile = Rs.getString("mobile");
				sLandline = Rs.getString("landline");
				sEmail = Rs.getString("email");
				sDesc = Rs.getString("description");
			}
		}catch(Exception e){ System.out.println(e); }
		
		if (Rs != null ) Rs.close();
		if (Stmt != null ) Stmt.close();
		if (Con != null ) Con.close();
	}
%>

	<link href="../css/default.css" rel="stylesheet" type="text/css" />
	<link href="../css/main.css" rel="stylesheet" type="text/css" />		
<!-- Common Validation -->				
	<script src='../js/validation.js' language='javascript' ></script>		
	<script src='../js/common.js' language='javascript' ></script>
<!-- jquery main -->				
	<script type="text/JavaScript" src="../jquery/jquery-1.4.2.min.js"></script>			
<!-- Form Field Validation -->			
    <link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
    <script src="../js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"> </script>	
<!-- Ajax -->
	<script src='../ajax/ajax_fn.js' language='javascript' ></script>	
<!-- Menu -->	
	<link type="text/css" href="../menu/menu.css" rel="stylesheet" />
    <script type="text/javascript" src="../menu/menu.js"></script>
	
<script type="text/JavaScript">
	var vLoginStatus = <%=(String)session.getAttribute("SES_USERSNO")%>;
	var vUserType = <%=iUserType%>;	
/* Form Validation */
	jQuery(document).ready(function(){
		// binds form submission and fields to the validation engine
		//jQuery("#frmUser").validationEngine();
	});
	
</script>
</head>
	
<body >
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr><td align="center">
<table width="1004px" cellpadding="0" cellspacing="0" border="0" class="formbk" >
<tr> <td align="center" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="wrapper" >
<tr><td align="center"><script src="../js/top.js"></script></td></tr>
<tr><td colspan="2" >&nbsp;</td></tr>
<tr><td colspan="2" align="center" class="mainhead" >Real Estate - Land</td></tr>
<tr><td colspan="2" >&nbsp;</td></tr>
  <tr valign="top" >
  <td> 
	<table width='100%' cellpadding="0" cellspacing="0" border="0" >
	<tr>
		<td align="center" width='50%' valign="top">
			<table width="60%" cellpadding="1" cellspacing="3" border="0" >
			<tr><td align="left" valign="middle" colspan='3' class="bodytitle" >Basic Details</td></tr>
			<tr><td colspan='3' align="left" ><hr align="left" width="40%" /></td></tr>
				<tr>
					<td width="35%" align="left" valign="top">Land Type</td>
					<td width="1%">	:</td>
					<td align="left" class="style1" valign="top">
						<select id="cb_landtype" name="cb_landtype" >
							<option value="0" >Others</option>
							<option value="1" >Residential</option>
							<option value="2" >Commertial</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="35%" align="left" valign="top">Title</td>
					<td width="1%">	:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="45" id="txt_title" name="txt_title" value="<%=sTitle%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Owners Name</td>
					<td >:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="35" id="txt_ownername" name="txt_ownername" value="<%=sOwnerName%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Location</td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="35" id="txt_location" name="txt_location" value="<%=sLocation%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Lot</td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="15" id="txt_lot" name="txt_lot" value="<%=sLot%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Land Tax Number</td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="15" id="txt_landtaxno" name="txt_landtaxno" value="<%=sLandTaxNo%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Water Zone Area </td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="35" id="txt_waterzone" name="txt_waterzone" value="<%=sWaterzone%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Price </td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="15" id="txt_price" name="txt_price" value="<%=sPrice%>" />
					</td>
				</tr>
				<tr><td colspan='3' align="left" >&nbsp;</td></tr>				
				<tr><td align="left" valign="middle" colspan="3" class="bodytitle">Contact Details</td></tr>
				<tr><td colspan='3' align="left" ><hr align="left" width="40%" /></td></tr>
				<tr>
					<td align="left" valign="top">Address</td>
					<td  valign="top" >:</td>
					<td align="left" class="style1" valign="top">
						<textarea type="text" rows="5" cols="30" id="ta_address" name="ta_address" ><%=sAddress%></textarea>
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Mobile </td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="15" id="txt_mobile" name="txt_mobile" value="<%=sMobile%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Landline </td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="15" id="txt_landline" name="txt_landline" value="<%=sLandline%>" />
					</td>
				</tr>
				<tr>
					<td align="left" valign="top">Email ID</td>
					<td>:</td>
					<td align="left" class="style1" valign="top">
						<input type="text" size="35" id="txt_email" name="txt_email" value="<%=sEmail%>" />
					</td>
				</tr>
				<tr><td colspan='3' align="left" >&nbsp;</td></tr>				
				<tr><td align="left" valign="middle" colspan='3' class="bodytitle" >Other Details</td></tr>
				<tr><td colspan='3' align="left" ><hr align="left" width="40%" /></td></tr>			
				<tr>
					<td align="left" valign="top" >Description</td>
					<td  valign="top" >:</td>
					<td align="left" class="style1" valign="top">
						<textarea type="text" rows="5" cols="30" id="ta_desc" name="ta_desc" ><%=sDesc%></textarea>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>
	<tr>
		<td colspan="2" align="center">
			<a href="#" onclick="validation();" ><img src="../images/bt_save.png" border="0" ></a>
		</td>
	</tr>
	<tr><td colspan="2">&nbsp;</td>	</tr>
</table>
</td></tr>
</table></td></tr>
<tr><td align="center"><script src="../js/bottom.js"></script></td></tr>
</table>
</td></tr></table>
</body>
</html>
